/**
 * @program: javase
 * @description:
 * @author: lld
 * @create: 2021-05-31 22:18
 **/
public class Singleton1 {
    private volatile static Singleton1 singleton1 = null;

    private Singleton1() {

    }

    public static Singleton1 getSingleton1() {
        if (singleton1 == null) {
            synchronized (Singleton1.class) {
                if (singleton1 == null) {
                    singleton1 = new Singleton1();
                }
            }
        }
        return singleton1;
    }

}
